package cc.linker.steplink.crm.dao;

import cc.linker.steplink.crm.domain.Label;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface LabelDao {
    int deleteByPrimaryKey(String labelId);

    int insert(Label record);

    int insertSelective(Label record);

    Label selectByPrimaryKey(String labelId);

    int updateByPrimaryKeySelective(Label record);

    int updateByPrimaryKey(Label record);

    Map<String, Object> getLabel(String labelId);

    String getLabelIdByName(Map<String, String> map);

    List<Map<String, Object>> listLabel(Map<String, Object> map);

    List<Map<String, Object>> getLabelsByOrgId(String orgId);

    List<Map<String, Object>> getArticleLabelsByOrgId(String orgId);

    List<Map<String, Object>> getLabelList(@Param(value="orgId") String orgId,@Param(value="labelType") Integer labelType);

    int ifLabelExist(Label record);

    void deleteGoodsRel(String labelId);

    void updateLabelsRelation(Map<String, Object> map);
}